<template>
  <div class="container">
    <el-tabs v-model="carTabsValue" @tab-click="handleClick">
      <el-tab-pane
        v-for="item in carTabs"
        :key="item.name"
        :label="item.title"
        :name="item.name"
      >
      </el-tab-pane>
    </el-tabs>
    <iframe id="dialogVisibleCCTViframe" :src="url" frameborder="0" width="100%" height="500px"></iframe>
  </div>
</template>
<script>
export default {
  data () {
    return {
      carTabsValue: '1',
      carTabs: [{
        title: '津C95726',
        name: '1',
      }
      // , {
      //   title: '车辆二',
      //   name: '2',
      // }, {
      //   title: '车辆三',
      //   name: '3',
      // }, {
      //   title: '车辆四',
      //   name: '4',
      // }
      ],
      url: ''
    }
  },
  mounted () {
    // const { LICENSE_PLATE } = this.$route.query;
    var LICENSE_PLATE  = this.carTabs[(this.carTabsValue - 1)].title
    // 传入用户名、密码和车牌号参见：http://111.160.78.62:88/808gps/open/player/video.html?lang=zh&vehiIdno=津C95726&account=bhclc&password=bhclc
    this.url = "http://111.160.78.62:88/808gps/open/player/video.html?lang=zh&vehiIdno=" +LICENSE_PLATE +"&account=bhclc&password=bhclc"
    console.log("videoURL=" + this.url)
  },
  methods: {
    handleClick(tab, event) {
      // console.log(tab, event);
    }
  }
}
</script>
<style>

</style>